<template>
  <z-input v-model:value="value" allow-clear @change="clear" />
</template>
<script>
import { defineComponent, ref } from 'vue'

export default defineComponent({
  name: 'InputDemo7',
  setup(){
    const value = ref('')
    const clear = (row) => {
      console.log(row.type, 'row.type')
      if (row.type === 'click') {
        alert('触发了clear按钮事件')
      }
    }
    return {
      value,
      clear
    }
  }
})
</script>
